﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Các loại socket</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">I'm 
afraid this sample code doesn't address the question.</SPAN><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">Broadcasting can't be done with <STRONG>TCP Sockets</STRONG> 
      which only support point to point (unicast) 
connected transmission.</SPAN><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">To broadcast, you need to use a <STRONG>UDP socket</STRONG> 
(<FONT color=#ff0000>DatagramSocket</FONT> 
        ).</SPAN><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><BR 
style="WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"><SPAN 
style="DISPLAY: inline! important; FLOAT: none; WORD-SPACING: 0px; FONT: 13px Verdana, Arial, Helvetica, sans-serif; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BACKGROUND-COLOR: rgb(207,217,255); orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">You might also want to use multicasting (<FONT 
color=#ff0000>MulticastSocket</FONT> 
      ).</SPAN></body>
</html>
